/*
 * Created by Administrator on 2017/3/31.
 */

var Tooltip = require('../../../../src/libs/tooltip');
var RealName = React.createClass({
    getDefaultProps: function() {
        return{
            data:{
                AccType:0,
                Mobile:"",  //手机
                IsBindMobile:"",//是否绑定手机
                BindMobileUrl:"",//绑定手机链接
                IsBindIDCard:"",//是否验证身份
                BindIDCardUrl:"",//验证身份链接
                IsBindBankCard:"",//是否绑卡
                BindBankCardUrl:"",//绑卡链接
                Current:"InvestAccount",  //当前选中菜单
                InvestAccountUrl:"",//账户总览链接
                InvestListUrl:"",//投资记录链接
                MyBankCardUrl:"",//我的银行卡链接
                InvestInfoUrl:"",//投资个人信息
                InvestMessageUrl:"",//投资消息中心
                FinanceAccountUrl:"",//账户总览链接
                FinanceListUrl:"",//融资记录链接
                FinanceAccountInfoUrl:"",//融资账号信息
                FinanceMessageUrl:""//融资消息中心
            }
        }
    },
    componentDidMount:function(){

    },
    render: function () {
        return (
            <div>
                <div className="info" ref="realName">
                        <div className="face"><img src="../images/account/face.jpg" alt=""/>{this.props.data.Mobile}</div>
                    {this.props.data.AccType ? "" :<div className="bind">
                        <Tooltip title={this.props.data.IsBindMobile ? "已绑定手机" : "未绑定手机"}><i className={"iconfont icon-phone1 tooltip "+ (this.props.data.IsBindMobile ? "ok" : "")}></i><a href={this.props.data.BindMobileUrl} ></a></Tooltip>
                        <Tooltip title={this.props.data.IsBindIDCard ? "已绑定身份证" : "未绑定身份证"} ><i className={"iconfont icon-idcard2 tooltip "+ (this.props.data.IsBindIDCard ? "ok" : "")}></i><a href={this.props.data.BindIDCardUrl} ></a></Tooltip>
                        <Tooltip title={this.props.data.IsBindBankCard ? "已绑定银行卡" : "未绑定银行卡"} className={"iconfont icon-bankcard tooltip "+ (this.props.data.IsBindBankCard ? "ok" : "")}><a href={this.props.data.BindBankCardUrl} ></a></Tooltip>
                    </div>
                    }
                </div>
                <div className="nav">
                    {this.props.data.AccType ? <ul>
                            <li><a href={this.props.data.FinanceAccountUrl} className={this.props.data.Current == "FinanceAccount" ? "current": ""}> <i className="icon-loan iconfont"></i>账户总览</a></li>
                            <li><a href={this.props.data.FinanceListUrl} className={this.props.data.Current == "FinanceList" ? "current": ""}><i className="icon-card iconfont"></i>融资记录</a></li>
                            <li><a href={this.props.data.FinanceAccountInfoUrl} className={this.props.data.Current == "FinanceAccountInfo" ? "current": ""}><i className="icon-personal iconfont"></i>账号信息</a></li>
                            <li><a href={this.props.data.FinanceMessageUrl} className={this.props.data.Current == "FinanceMessage" ? "current": ""}><i className="icon-news iconfont"></i>消息中心<b></b></a></li> </ul>
                          : <ul><li><a href={this.props.data.InvestAccountUrl} className={this.props.data.Current == "InvestAccount" ? "current": ""}> <i className="icon-loan iconfont"></i> 账户总览</a></li>
                        <li><a href={this.props.data.InvestListUrl}  className={this.props.data.Current == "InvestList" ? "current": ""}> <i className="icon-record iconfont"></i>投资记录</a></li>
                        <li><a href={this.props.data.MyBankCardUrl} className={this.props.data.Current == "MyBankCard" ? "current": ""}> <i className="icon-card iconfont"></i>我的银行卡</a></li>
                        <li><a href={this.props.data.InvestInfoUrl} className={this.props.data.Current == "InvestInfo" ? "current": ""}> <i className="icon-personal iconfont"></i>个人信息</a></li>
                        <li><a href={this.props.data.InvestMessageUrl} className={this.props.data.Current == "InvestMessage" ? "current": ""}> <i className="icon-news iconfont"></i>消息中心<b></b></a></li>
                    </ul>}
                </div>
                <div className="qrcode">
                    <p className="ss">扫一扫，立马赚钱<b className="bg-icon"></b></p>
                    <img src="../images/qrcode.jpg" alt=""/>
                </div>
            </div>
        )
    }
})

module.exports = RealName;